package com.bh.kysys.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bh.common.annotation.Dict;
import com.bh.common.annotation.Excel;
import lombok.Data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * 行政区域对象 jc_zone
 *
 * @author slx
 * @date 2023-03-24
 */
@TableName("jc_zone")
@Data
public class JcZone implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * 祖级列表
     */
    private String ancestors;

    /**
     * 名称
     */
    @Excel(name = "名称")
    private String name;

    private String extId;

    @Excel(name = "扩展名称")
    private String extName;

    /**
     * pinyin_prefix
     */
    @Excel(name = "拼音前缀")
    private String pinyinPrefix;

    /**
     * pinyin
     */
    @Excel(name = "拼音")
    private String pinyin;

    /**
     * 坐标
     */
    @Excel(name = "坐标")
    private String latitude;

    /**
     * 级别
     */
    @Excel(name = "级别")
    private String level;

    /** 父ID */
    /**
     * 行政区域 城市
     */
    @Dict(dictTable = "jc_zone", dictLabel = "name", dictValue = "id", dictAlias = "parentName")
    @Excel(name = "父ID")
    private Long zid;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private Integer status;


    @Excel(name = "排序")
    private Long orderNum;


    /**
     * 是否有子节点（0无 1有）
     */
    @TableField(exist = false)
    private Boolean hasChildren = false;

    /**
     * 父部门名称
     */
    @TableField(exist = false)
    private String parentName;


    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();
}
